aws-iot/build/Makefile:
	cd aws-iot/build && cmake -DSYS_PATH=$(SYSTEM_PATH) -DCMAKE_TOOLCHAIN_FILE=../cross_compile.cmake -DOPENSSL_ROOT_DIR=$(SYSTEM_PATH)/openssl2 -DUSE_OPENSSL=ON -DBUILD_DEPS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release --build ..

aws-iot:aws-iot/build/Makefile 
	$(MAKE) -C aws-iot/build

aws-iot-clean:
	$(MAKE) -C aws-iot/build clean

aws-iot-distclean:
	$(RM) -rf aws-iot/build/*

aws-iot-install:
	cp -alf aws-iot/build/discovery/libDiscovery-cpp.so $(USRLIBDIR)
	cp -alf aws-iot/build/identity/libIotIdentity-cpp.so $(USRLIBDIR)
	cp -alf aws-iot/build/lib/libaws-c-event-stream.so $(USRLIBDIR)
	cp -alf aws-iot/build/lib/libs2n.so $(USRLIBDIR)
	cp -alf aws-iot/build/lib/libaws-c-event-stream.so.1.0.0 $(USRLIBDIR)
	cp -alf aws-iot/build/shadow/libIotShadow-cpp.so $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-c-iot/libaws-c-iot.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-cal/libaws-c-cal.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-common/libaws-c-common.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-s3/libaws-c-s3.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-mqtt/libaws-c-mqtt.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-io/libaws-c-io.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-http/libaws-c-http.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-auth/libaws-c-auth.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-checksums/libaws-checksums.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/crt/aws-c-compression/libaws-c-compression.so* $(USRLIBDIR)
	cp -alf aws-iot/build/crt/aws-crt-cpp/libaws-crt-cpp.so $(USRLIBDIR)
	cp -alf aws-iot/build/jobs/libIotJobs-cpp.so $(USRLIBDIR)
	cp -alf aws-iot/build/devicedefender/libIotDeviceDefender-cpp.so $(USRLIBDIR)
	cp -alf aws-iot/build/secure_tunneling/libIotSecureTunneling-cpp.so $(USRLIBDIR)
	${STRIP} ${USRLIBDIR}/libDiscovery-cpp.so
	${STRIP} ${USRLIBDIR}/libIotIdentity-cpp.so
	${STRIP} ${USRLIBDIR}/libaws-c-event-stream.so
	${STRIP} ${USRLIBDIR}/libs2n.so
	${STRIP} ${USRLIBDIR}/libaws-c-event-stream.so.1.0.0
	${STRIP} ${USRLIBDIR}/libIotShadow-cpp.so
	${STRIP} ${USRLIBDIR}/libaws-c-iot.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-cal.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-common.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-s3.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-mqtt.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-io.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-http.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-auth.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-checksums.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-c-compression.so.1.0.0
	${STRIP} ${USRLIBDIR}/libaws-crt-cpp.so
	${STRIP} ${USRLIBDIR}/libIotJobs-cpp.so
	${STRIP} ${USRLIBDIR}/libIotDeviceDefender-cpp.so
	${STRIP} ${USRLIBDIR}/libIotSecureTunneling-cpp.so
